//logging same python

var logging = {}


logging.kLEVEL = {
	"DEBUG":4,
	"INFO":3,
	"WARN":2,
	"ERROR":1,
}

logging.baseConfig = {			//Default Config
	level:"INFO" 				
}

//base print func
logging._pfunc = function(str){
	console.log(str)
}


logging.debug = function(str){
	if (this.kLEVEL[this.baseConfig.level] >= this.kLEVEL["DEBUG"]){
		this._pfunc(str)
	}
}

logging.info = function(str){
	if (this.kLEVEL[this.baseConfig.level] >= this.kLEVEL["INFO"]){
		this._pfunc(str)
	}
}


logging.warn = function(str){
	if (this.kLEVEL[this.baseConfig.level] >= this.kLEVEL["WARN"]){
		this._pfunc(str)
	}
}

logging.error = function(str){
	if (this.kLEVEL[this.baseConfig.level] >= this.kLEVEL["ERROR"]){
		this._pfunc(str)
	}
}


//**use cc.log-cc.warn-cc.debug-cc.error in c2dx-js**
if (typeof Array.isArray(cc)){
	// cc.info = 
}